package model;

import java.io.Serializable;

import javax.persistence.*;

import java.util.Date;


/**
 * The persistent class for the candidate database table.
 * 
 */
@Entity
@NamedQuery(name="Candidate.findAll", query="SELECT c FROM Candidate c")
public class Candidate implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int idCandidate;

	@Lob
	private String cv;

	@Temporal(TemporalType.DATE)
	private Date dateCandidacy;

	private int idCitizen;

	@Lob
	private String motLetter;

	//bi-directional one-to-one association to Subscribe
	@OneToOne
	@PrimaryKeyJoinColumn
	private Subscribe subscribe;

	public Candidate() {
	}

	public int getIdCandidate() {
		return this.idCandidate;
	}

	public void setIdCandidate(int idCandidate) {
		this.idCandidate = idCandidate;
	}

	public String getCv() {
		return this.cv;
	}

	public void setCv(String cv) {
		this.cv = cv;
	}

	public Date getDateCandidacy() {
		return this.dateCandidacy;
	}

	public void setDateCandidacy(Date dateCandidacy) {
		this.dateCandidacy = dateCandidacy;
	}

	public int getIdCitizen() {
		return this.idCitizen;
	}

	public void setIdCitizen(int idCitizen) {
		this.idCitizen = idCitizen;
	}

	public String getMotLetter() {
		return this.motLetter;
	}

	public void setMotLetter(String motLetter) {
		this.motLetter = motLetter;
	}

	public Subscribe getSubscribe() {
		return this.subscribe;
	}

	public void setSubscribe(Subscribe subscribe) {
		this.subscribe = subscribe;
	}

}